﻿/*功能描述：客户设置
作者：李周蓬
时间：2021-12-07
修改人：李周蓬
修改时间：2021-12-07*/
using HongStone.Domain.ClientManagementModel;
using HongStone.Dto;
using HongStone.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HongStone.Service
{
    public class CustomerBll
    {
        private readonly CustomerDal _customerDal;
        public CustomerBll(CustomerDal customerDal)
        {
            _customerDal = customerDal;
        }
        public ResultData AddResponsiblePerson(ResponsiblePerson responsiblePerson)
        {
            return _customerDal.AddResponsiblePerson(responsiblePerson);
        }
        public ResultData AddSatisfactionSurvey(SatisfactionSurvey satisfactionSurvey)
        {
            return _customerDal.AddSatisfactionSurvey(satisfactionSurvey);
        }
       
        //public ResultData ShowManYiDu(string manyidu)
        //{
        //    return _customerDal.ShowManYiDu(manyidu);
        //}
        public ResultData ShowManYiDu()
        {
            return _customerDal.ShowManYiDu();
        }
        public ResultData BindCity(int id)
        {
            return _customerDal.BindCity(id);
        }
        public ResultData AddEntering(Customer customer)
        {
            return _customerDal.AddEntering(customer);
        }
        public ResultData AddEnterings(ExtendInformation extendInformation)
        {
            return _customerDal.AddEnterings(extendInformation);
        }
        /// <summary>
        /// 添加附件
        /// </summary>
        /// <param name="accessory"></param>
        /// <returns></returns>
        public ResultData AddFile(Accessory accessory)
        {
            return _customerDal.AddFile(accessory);
        }
        public ResultData ShowList(int pageindex, int pagesize, CheckDto checkDto, out int totalcount)
        {
            return _customerDal.ShowList( pageindex,  pagesize,  checkDto, out totalcount);
        }
        /// <summary>
        /// 显示列表
        /// </summary>
        /// <returns></returns>
        public ResultData ShowLie()
        {
            return _customerDal.ShowLie();
        }
        /// <summary>
        /// 批量删除客户基本信息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public ResultData Del(string ids)
        {
            return _customerDal.Del(ids);
        }
        /// <summary>
        /// 批量删除客户扩展信息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public ResultData Dels(string ids)
        {
            return _customerDal.Dels(ids);
        }
        /// <summary>
        /// 显示甲方负责人
        /// </summary>
        /// <returns></returns>
        public ResultData ShowJia()
        {
            return _customerDal.ShowJia();
        }
        /// <summary>
        /// 显示满意度调查
        /// </summary>
        /// <returns></returns>
        public ResultData ShowMan()
        {
            return _customerDal.ShowMan();
        }
        /// <summary>
        /// 修改客户基本信息
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public ResultData UpdateCustomer(Customer customer)
        {
            return _customerDal.UpdateCustomer(customer);
        }
        /// <summary>
        /// 修改客户扩展信息
        /// </summary>
        /// <param name="extendInformation"></param>
        /// <returns></returns>
        public ResultData UpdateExtendInformation(ExtendInformation extendInformation)
        {
            return _customerDal.UpdateExtendInformation(extendInformation);
        }
        /// <summary>
        /// 删除甲方负责人
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultData DelJia(string id)
        {
            return _customerDal.DelJia(id);
        }
        /// <summary>
        /// 删除满意度调查
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultData DelMan(string id)
        {
            return _customerDal.DelMan(id);
        }
        /// <summary>
        /// 修改甲方负责人
        /// </summary>
        /// <param name="responsiblePerson"></param>
        /// <returns></returns>
        public ResultData UpdateJia(ResponsiblePerson responsiblePerson)
        {
            return _customerDal.UpdateJia(responsiblePerson);
        }
        /// <summary>
        /// 修改满意度调查
        /// </summary>
        /// <param name="satisfactionSurvey"></param>
        /// <returns></returns>
        public ResultData UpdateMan(SatisfactionSurvey satisfactionSurvey)
        {
            return _customerDal.UpdateMan(satisfactionSurvey);
        }
        /// <summary>
        /// 联系人信息的显示查询分页
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="name"></param>
        /// <param name="beginTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public ResultData ShowJiaPage(int pageindex, int pagesize, string name, DateTime? beginTime, DateTime? endTime, out int totalcount)
        {
            return _customerDal.ShowJiaPage(pageindex, pagesize,name, beginTime, endTime,out totalcount);
        }
        /// <summary>
        /// 显示分页查询文件
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="name"></param>
        /// <param name="beginTime"></param>
        /// <param name="endTime"></param>
        /// <param name="totalcount"></param>
        /// <returns></returns>
        public ResultData ShowFile(string name, DateTime? beginTime, DateTime? endTime, out int totalcount, int pageindex = 1, int pagesize = 3)
        {
            return _customerDal.ShowFile(name,beginTime, endTime, out totalcount, pageindex, pagesize);
        }
        /// <summary>
        /// 客户高级查询查询
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="number"></param>
        /// <param name="name"></param>
        /// <param name="jian"></param>
        /// <param name="addr"></param>
        /// <param name="lian"></param>
        /// <param name="phone"></param>
        /// <param name="sheng"></param>
        /// <param name="shi"></param>
        /// <param name="xian"></param>
        /// <param name="type"></param>
        /// <param name="hang"></param>
        /// <param name="time"></param>
        /// <param name="totalcount"></param>
        /// <returns></returns>
        public ResultData ShowCustomerTotal(int pageindex, int pagesize, string number, string name, string jian, string addr, string lian, string phone, string sheng, string shi, int type, int hang, DateTime? begintime, DateTime? endtime, out int totalcount)
        {
            return _customerDal.ShowCustomerTotal(pageindex, pagesize, number, name, jian, addr, lian, phone, sheng, shi, type, hang, begintime,endtime, out totalcount);
        }
        /// <summary>
        /// 显示文件
        /// </summary>
        /// <returns></returns>
        public ResultData ShowFiles()
        {
            return _customerDal.ShowFiles();
        }
        /// <summary>
        /// 批量删除文件
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public ResultData DelProject(string ids)
        {
            return _customerDal.DelProject(ids);
        }
        public ResultData ShowCheckList()
        {
            return _customerDal.ShowCheckList();
        }
        public ResultData ShowCheckListCheck()
        {
            return _customerDal.ShowCheckListCheck();
        }
        /// <summary>
        /// 显示录入列表
        /// </summary>
        /// <param name="checkDto"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalcount"></param>
        /// <returns></returns>
        public ResultData ShowLists(int pageindex, int pagesize, out int totalcount)
        {
            return _customerDal.ShowLists(pageindex, pagesize, out totalcount);
        }
    }
}
